﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PUZZLEgestServer.DTO
{
    public class DTO
    {
        public enum DTOState
        {
            Detached = 1,
            //
            // Summary:
            //     The object has not been modified since it was loaded into the context or
            //     since the last time that the System.Data.Objects.ObjectContext.SaveChanges()
            //     method was called.
            Unchanged = 2,
            //
            // Summary:
            //     The object is added to the object context and the System.Data.Objects.ObjectContext.SaveChanges()
            //     method has not been called. Objects are added to the object context by calling
            //     the System.Data.Objects.ObjectContext.AddObject(System.String,System.Object)
            //     method.
            Added = 4,
            //
            // Summary:
            //     The object is deleted from the object context by using the System.Data.Objects.ObjectContext.DeleteObject(System.Object)
            //     method.
            Deleted = 8,
            //
            // Summary:
            //     The object is changed but the System.Data.Objects.ObjectContext.SaveChanges()
            //     method has not been called.
            Modified = 16,
        }

        public int Id { get; set; }
        public DTOState State { get; set; }
        public string Timestamp { get; set; }

        public DTO()
        {
            this.Id = 0;
            this.State = DTOState.Added;
            this.Timestamp = DateTime.Now.ToString("YYYY.MM.DD.HH.mm.ss.zzz");
        }

    }
}
